import { ILv70DramaStepCommand } from "../interfaces/ILv70DramaStepCommand";
import { TDrama } from "../../../../../Message/Db/Tables/TDrama";
import { FallenLeavesManager } from "../../../../../extend/flash/flower/fallenLeaves/FallenLeavesManager";
import { ResFileConst } from "../../../resource/ResFileConst";
//class Lv70OpFallenLeaves
    
    export  class Lv70OpFallenLeaves implements ILv70DramaStepCommand
    {
        

        public call(arg1: TDrama, arg2: Function=null): void
        {
            this._callback = arg2;
            this._executor = new FallenLeavesManager();
            this._executor.addFlowerQueue(0, arg1.valueOne, ResFileConst.FallenLeaves);
            this._timer = new Object /* flash.utils.Timer */(arg1.valueTwo, 1);
            this._timer.addEventListener(flash.events.TimerEvent.TIMER_COMPLETE, this.onTimer);
            this._timer.start();
            return;
        }

        public cancel(arg1: TDrama, arg2: Function=null): void
        {
            return;
        }

        /* internal  */onTimer(arg1: Object /* flash.events.TimerEvent */): void
        {
            if (this._callback != null) 
            {
                this._callback.apply();
            }
            return;
        }

        public dispose(): void
        {
            return;
        }

        /* internal */ /* var */_executor: FallenLeavesManager;

        /* internal */ /* var */_timer: Object /* flash.utils.Timer */;

        /* internal */ /* var */_callback: Function;
    }
